(function(){
	if(sessionStorage.id){
		var shopcart = document.getElementsByClassName("shopcart")[0];
		shopcart.addEventListener("click", function(){open("../html/shopcart.html");})
		$(".hadLogin").html("<span>欢迎用户"+sessionStorage.name+"登录金逸电影！</span>")
	}
	$("span:contains('账户设置')").click(function(){
		$(".hadLogin").html('<a href="login.html" target="_self">登录</a><a href="register.html" target="_self">注册</a>');
		sessionStorage.clear();
		location.reload();
	})









})()